﻿Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.ComponentModel.Design.Serialization 
Imports System.IO
Imports System.Runtime.Serialization 

Namespace System.Workflow.ComponentModel
    '<DesignerSerializer(GetType(ActivityTypeCodeDomSerializer), GetType(TypeCodeDomSerializer)), DesignerSerializer(GetType(ActivityCodeDomSerializer), GetType(CodeDomSerializer)), Designer(GetType(ActivityDesigner), GetType(IDesigner)), ActivityExecutor(GetType(ActivityExecutor([Of] Activity))), RuntimeNameProperty("Name"), Designer(GetType(ActivityDesigner), GetType(IRootDesigner)), ToolboxItem(GetType(ActivityToolboxItem)), DesignerCategory("Component"), ActivityValidator(GetType(ActivityValidator)), ToolboxBitmap(GetType(Activity), "Design.Resources.Activity.png"), DesignerSerializer(GetType(ActivityMarkupSerializer), GetType(WorkflowMarkupSerializer)), ActivityCodeGenerator(GetType(ActivityCodeGenerator)), ToolboxItemFilter("Microsoft.Workflow.VSDesigner", ToolboxItemFilterType.Require), ToolboxItemFilter("System.Workflow.ComponentModel.Design.ActivitySet", ToolboxItemFilterType.Allow)> _
    Public Class Activity
        Inherits DependencyObject
        ' Events
        'Friend Shared Custom Event ActivityResolve As ActivityResolveEventHandler
        '    AddHandler(ByVal value As ActivityResolveEventHandler)
        '    End AddHandler
        '    RemoveHandler(ByVal value As ActivityResolveEventHandler)
        '    End RemoveHandler
        'End Event
        ''<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        'Public Custom Event Canceling As EventHandler([Of] ActivityExecutionStatusChangedEventArgs)
        '    AddHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End AddHandler
        '    RemoveHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End RemoveHandler
        'End Event
        ''<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        'Public Custom Event Closed As EventHandler([Of] ActivityExecutionStatusChangedEventArgs)
        '    AddHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End AddHandler
        '    RemoveHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End RemoveHandler
        'End Event
        ''<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        'Public Custom Event Compensating As EventHandler([Of] ActivityExecutionStatusChangedEventArgs)
        '    AddHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End AddHandler
        '    RemoveHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End RemoveHandler
        'End Event
        ''<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        'Public Custom Event Executing As EventHandler([Of] ActivityExecutionStatusChangedEventArgs)
        '    AddHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End AddHandler
        '    RemoveHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End RemoveHandler
        'End Event
        ''<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        'Public Custom Event Faulting As EventHandler([Of] ActivityExecutionStatusChangedEventArgs)
        '    AddHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End AddHandler
        '    RemoveHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End RemoveHandler
        'End Event
        ''<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        'Public Custom Event StatusChanged As EventHandler([Of] ActivityExecutionStatusChangedEventArgs)
        '    AddHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End AddHandler
        '    RemoveHandler(ByVal value As EventHandler([Of] ActivityExecutionStatusChangedEventArgs))
        '    End RemoveHandler
        'End Event
        'Friend Shared Custom Event WorkflowChangeActionsResolve As WorkflowChangeActionsResolveEventHandler
        '    AddHandler(ByVal value As WorkflowChangeActionsResolveEventHandler)
        '    End AddHandler
        '    RemoveHandler(ByVal value As WorkflowChangeActionsResolveEventHandler)
        '    End RemoveHandler
        'End Event

        ' Methods
        Public Sub New()
        End Sub

        Public Sub New(ByVal name As String)
        End Sub

        Friend Shared Function ActivityExecutionResultEnumToString(ByVal activityExecutionResult As ActivityExecutionResult) As String
        End Function

        Friend Shared Function ActivityExecutionStatusEnumToString(ByVal status As ActivityExecutionStatus) As String
        End Function

        Protected Friend Overridable Function Cancel(ByVal executionContext As ActivityExecutionContext) As ActivityExecutionStatus
        End Function

        Public Function Clone() As Activity
        End Function

        'Friend Overridable Function CollectNestedActivities() As IList([Of] Activity)
        'End Function

        Friend Sub DecrementCompletedOrderId()
        End Sub

        Protected Friend Overridable Function Execute(ByVal executionContext As ActivityExecutionContext) As ActivityExecutionStatus
        End Function

        Friend Overrides Sub FixUpMetaProperties(ByVal originalObject As DependencyObject)
        End Sub

        Friend Overridable Sub FixUpParentChildRelationship(ByVal definitionActivity As Activity, ByVal parentActivity As Activity, ByVal deserializedActivities As Hashtable)
        End Sub

        Public Function GetActivityByName(ByVal activityQualifiedName As String) As Activity
        End Function

        Public Function GetActivityByName(ByVal activityQualifiedName As String, ByVal withinThisActivityOnly As Boolean) As Activity
        End Function

        Protected Friend Overridable Function HandleFault(ByVal executionContext As ActivityExecutionContext, ByVal exception As Exception) As ActivityExecutionStatus
        End Function

        'Friend Sub HoldLockOnStatusChange(ByVal eventListener As IActivityEventListener([Of] ActivityExecutionStatusChangedEventArgs))
        'End Sub

        Friend Function IncrementCompletedOrderId() As Integer
        End Function

        Protected Friend Overridable Sub Initialize(ByVal provider As IServiceProvider)
        End Sub

        'Protected Friend Sub Invoke([Of] T As EventArgs)(ByVal handler As EventHandler([Of] T), ByVal e As T)
        'End Sub

        'Protected Friend Sub Invoke([Of] T As EventArgs)(ByVal eventListener As IActivityEventListener([Of] T), ByVal e As T)
        'End Sub

        Public Shared Function Load(ByVal stream As Stream, ByVal outerActivity As Activity) As Activity
        End Function

        Public Shared Function Load(ByVal stream As Stream, ByVal outerActivity As Activity, ByVal formatter As IFormatter) As Activity
        End Function

        Friend Sub MarkCanceled()
        End Sub

        Friend Sub MarkCompensated()
        End Sub

        Friend Sub MarkCompleted()
        End Sub

        Friend Sub MarkFaulted()
        End Sub

        Protected Friend Overridable Sub OnActivityExecutionContextLoad(ByVal provider As IServiceProvider)
        End Sub

        Protected Friend Overridable Sub OnActivityExecutionContextUnload(ByVal provider As IServiceProvider)
        End Sub

        Protected Overridable Sub OnClosed(ByVal provider As IServiceProvider)
        End Sub
 

        Friend Overrides Sub OnInitializeDefinitionForRuntime()
        End Sub
 

        Friend Shared Function OnResolveActivityDefinition(ByVal type As Type, ByVal workflowMarkup As String, ByVal rulesMarkup As String, ByVal createNew As Boolean, ByVal initForRuntime As Boolean, ByVal serviceProvider As IServiceProvider) As Activity
        End Function

        Friend Shared Function OnResolveWorkflowChangeActions(ByVal workflowChangesMarkup As String, ByVal root As Activity) As ArrayList
        End Function

        Protected Friend Sub [RaiseEvent](ByVal dependencyEvent As DependencyProperty, ByVal sender As Object, ByVal e As EventArgs)
        End Sub

        'Protected Friend Sub RaiseGenericEvent([Of] T As EventArgs)(ByVal dependencyEvent As DependencyProperty, ByVal sender As Object, ByVal e As T)
        'End Sub
 

        'Friend Sub ReleaseLockOnStatusChange(ByVal eventListener As IActivityEventListener([Of] ActivityExecutionStatusChangedEventArgs))
        'End Sub

        Friend Sub ResetAllKnownDependencyProperties()
        End Sub

        Public Sub Save(ByVal stream As Stream)
        End Sub

        Public Sub Save(ByVal stream As Stream, ByVal formatter As IFormatter)
        End Sub

        'Friend Sub SetParent(ByVal compositeActivity As CompositeActivity)
        'End Sub

        Friend Sub SetStatus(ByVal newStatus As ActivityExecutionStatus, ByVal transacted As Boolean)
        End Sub

        Public Overrides Function ToString() As String
        End Function

        Protected Sub TrackData(ByVal userData As Object)
        End Sub

        Protected Sub TrackData(ByVal userDataKey As String, ByVal userData As Object)
        End Sub

        Friend Overridable Function TraverseDottedPath(ByVal dottedPath As String) As Activity
        End Function

        Friend Function TraverseDottedPathFromRoot(ByVal dottedPathFromRoot As String) As Activity
        End Function

        Protected Friend Overridable Sub Uninitialize(ByVal provider As IServiceProvider)
        End Sub
 
        ' Properties
        Friend ReadOnly Property CachedDottedPath() As String
            Get
            End Get
        End Property

        Friend ReadOnly Property CanUninitializeNow() As Boolean
            Get
            End Get
        End Property

        Friend ReadOnly Property ContextActivity() As Activity
            Get
            End Get
        End Property

        Friend ReadOnly Property ContextGuid() As Guid
            Get
            End Get
        End Property

        Friend ReadOnly Property ContextId() As Integer
            Get
            End Get
        End Property

        '<SRDescription("DescriptionDescr"), DefaultValue(""), SRCategory("Activity"), Browsable(True), Editor(GetType(MultilineStringEditor), GetType(UITypeEditor))> _
        Public Property Description() As String
            Get
            End Get
            Set(ByVal value As String)
            End Set
        End Property

        Friend ReadOnly Property DottedPath() As String
            Get
            End Get
        End Property

        Friend Property DynamicUpdateMode() As Boolean
            Get
            End Get
            Set(ByVal value As Boolean)
            End Set
        End Property

        '<DefaultValue(True), SRCategory("Activity"), SRDescription("EnabledDescr"), Browsable(True)> _
        Public Property Enabled() As Boolean
            Get
            End Get
            Set(ByVal value As Boolean)
            End Set
        End Property

        '<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        Public ReadOnly Property ExecutionResult() As ActivityExecutionResult
            Get
            End Get
        End Property

        '<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        Public ReadOnly Property ExecutionStatus() As ActivityExecutionStatus
            Get
            End Get
        End Property

        '<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Friend ReadOnly Property HasPrimaryClosed() As Boolean
            Get
            End Get
        End Property

        Friend ReadOnly Property IsContextActivity() As Boolean
            Get
            End Get
        End Property

        '<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        Public ReadOnly Property IsDynamicActivity() As Boolean
            Get
            End Get
        End Property

        '<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        Friend ReadOnly Property LockCountOnStatusChange() As Integer
            Get
            End Get
        End Property

        '<DefaultValue(""), ParenthesizePropertyName(True), SRDescription("NameDescr"), MergableProperty(False), Browsable(True), SRCategory("Activity")> _
        Public Property Name() As String
            Get
            End Get
            Set(ByVal value As String)
            End Set
        End Property

        Friend ReadOnly Property NeedsCompensation() As Boolean
            Get
            End Get
        End Property

        '<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        'Public ReadOnly Property Parent() As CompositeActivity
        '    Get
        '    End Get
        'End Property

        Friend ReadOnly Property ParentContextActivity() As Activity
            Get
            End Get
        End Property

        Friend ReadOnly Property PersistOnClose() As Boolean
            Get
            End Get
        End Property

        '<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
        Public ReadOnly Property QualifiedName() As String
            Get
            End Get
        End Property

        Friend ReadOnly Property RootActivity() As Activity
            Get
            End Get
        End Property

        Friend ReadOnly Property RootContextActivity() As Activity
            Get
            End Get
        End Property

        Friend ReadOnly Property SupportsSynchronization() As Boolean
            Get
            End Get
        End Property

        Friend ReadOnly Property SupportsTransaction() As Boolean
            Get
            End Get
        End Property

        '<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(False)> _
        Friend ReadOnly Property WasExecuting() As Boolean
            Get
            End Get
        End Property

      

        Protected ReadOnly Property WorkflowInstanceId() As Guid
            Get
            End Get
        End Property



        Public Shared ReadOnly ActivityContextGuidProperty As DependencyProperty
        Friend Shared ReadOnly ActivityExecutionContextInfoProperty As DependencyProperty
        <ThreadStatic()> _
        Friend Shared ActivityRoots As ArrayList
        Friend Shared ActivityType As Type
        Public Shared ReadOnly CancelingEvent As DependencyProperty
        Public Shared ReadOnly ClosedEvent As DependencyProperty
        Public Shared ReadOnly CompensatingEvent As DependencyProperty
        Friend Shared ReadOnly CompletedExecutionContextsProperty As DependencyProperty
        Friend Shared ReadOnly CompletedOrderIdProperty As DependencyProperty
        <ThreadStatic()> _
        Friend Shared ContextIdToActivityMap As Hashtable
        Friend Shared ReadOnly CustomActivityProperty As DependencyProperty
        <ThreadStatic()> _
        Friend Shared DefinitionActivity As Activity
        Public Shared ReadOnly ExecutingEvent As DependencyProperty
        Friend Shared ReadOnly ExecutionResultProperty As DependencyProperty
        Friend Shared ReadOnly ExecutionStatusProperty As DependencyProperty
        Public Shared ReadOnly FaultingEvent As DependencyProperty
        Friend Shared ReadOnly HasPrimaryClosedProperty As DependencyProperty
        Friend Shared ReadOnly LockCountOnStatusChangeChangedEvent As DependencyProperty
         'Friend parent As CompositeActivity
        Public Shared ReadOnly StatusChangedEvent As DependencyProperty
        Friend Shared ReadOnly StatusChangedLockedEvent As DependencyProperty
        Friend Shared ReadOnly SynchronizationHandlesProperty As DependencyProperty
        Friend Shared ReadOnly WasExecutingProperty As DependencyProperty
        Friend Shared ReadOnly WorkflowDefinitionProperty As DependencyProperty
        Friend Shared ReadOnly WorkflowRulesMarkupProperty As DependencyProperty
        Friend Shared ReadOnly WorkflowRuntimeProperty As DependencyProperty
        Friend Shared ReadOnly WorkflowXamlMarkupProperty As DependencyProperty
    End Class
End Namespace

